import { ActivityStatus, ProjectStatus } from './form-status'
import type { FormItem } from '@/common/types/form'

/**
 * 项目表单字段
 * @author lian
 */
export const ProjectFormField: FormItem[] = [
  {
    name: 'projectName',
    labelName: '项目名称',
    itemType: 'input',
    type: 'text',
    placeholder: '请输入项目名称',
    defaultValue: '',
    maxlength: 20,
  },
  {
    name: 'brief',
    labelName: '项目简介',
    itemType: 'input',
    type: 'textarea',
    placeholder: '请输入项目简介',
    defaultValue: '',
    maxlength: 50,
  },
  {
    name: 'imgUrl',
    labelName: '项目图片',
    itemType: 'file-picker-image',
    defaultValue: '',
  },
  {
    name: 'status',
    labelName: '项目状态',
    itemType: 'data-checkbox',
    defaultValue: 0,
    localdata: ProjectStatus,
    selectedColor: '#ED4556',
    selectedTextColor: '#999999',
  },
  {
    name: 'implementationPlan',
    labelName: '项目实施计划',
    itemType: 'input',
    type: 'textarea',
    maxlength: 200,
    placeholder: '请输入项目实施计划',
    defaultValue: '',
  },
  {
    name: 'projectDescHtml',
    labelName: '项目详情',
    itemType: 'rich-text',
    defaultValue: '',
  },
  {
    name: 'targetAmount',
    labelName: '目标筹集金额',
    itemType: 'input',
    type: 'number',
    defaultValue: 1000,
  },
]

/**
 * 动态表单字段
 * @author lian
 */
export const DynamicFormField: FormItem[] = [
  {
    name: 'title',
    labelName: '动态标题',
    itemType: 'input',
    type: 'text',
    placeholder: '请输入动态标题',
    defaultValue: '',
    maxlength: 20,
  },
  {
    name: 'content',
    labelName: '动态内容',
    itemType: 'input',
    type: 'textarea',
    placeholder: '请输入动态内容',
    defaultValue: '',
    maxlength: 200,
  },
  {
    name: 'imgUrl',
    labelName: '动态图片',
    itemType: 'file-picker-image',
    defaultValue: '',
  },
]

/**
 * 活动表单字段
 * @author lian
 */
export const ActivityFormField: FormItem[] = [
  {
    name: 'activityName',
    labelName: '活动名称',
    itemType: 'input',
    defaultValue: '',
    type: 'text',
    placeholder: '请输入活动名称',
    maxlength: 20,
  },
  {
    name: 'brief',
    labelName: '活动简介',
    itemType: 'input',
    defaultValue: '',
    type: 'textarea',
    placeholder: '请输入活动简介',
    maxlength: 50,
  },
  {
    name: 'imgUrl',
    labelName: '活动图片',
    itemType: 'file-picker-image',
    defaultValue: '',
  },
  {
    name: 'startTimeAndEndTime',
    labelName: '开始时间和结束时间',
    itemType: 'date-time-picker',
    defaultValue: '',
    type: 'datetimerange',
  },
  {
    name: 'address',
    labelName: '活动地址',
    itemType: 'input',
    type: 'text',
    defaultValue: '',
    placeholder: '请输入活动地址',
  },
  {
    name: 'requireVolunteers',
    labelName: '所需志愿者人数',
    itemType: 'input',
    type: 'number',
    defaultValue: '',
    placeholder: '请输入所需志愿者人数',
  },
  {
    name: 'status',
    labelName: '活动状态',
    itemType: 'data-checkbox',
    defaultValue: 0,
    localdata: ActivityStatus,
    selectedColor: '#ED4556',
  },
  {
    name: 'activityDescHtml',
    labelName: '活动详情',
    itemType: 'rich-text',
    defaultValue: '',
  },
]
